package com.jied.duodian.entity.Dutity;

import lombok.Data;
import org.springframework.security.core.GrantedAuthority;
import org.springframework.security.core.userdetails.UserDetails;

import java.io.Serializable;
import java.util.Collection;

/**
 * Description:
 *
 * @author LiJie
 * @date Created on 2020/10/30
 * WWW https://github.com/j6l
 */

@Data
public class DdOUser implements UserDetails, Serializable {

    private String username;
    private String password;
    private Collection<? extends GrantedAuthority> authorities;

    public DdOUser() {
    }

    public DdOUser(String username, String password, Collection<? extends GrantedAuthority> authorities) {
        this.username = username;
        this.password = password;
        this.authorities = authorities;
    }

    @Override
    public boolean isAccountNonExpired() {
        return true;
    }

    @Override
    public boolean isAccountNonLocked() {
        return true;
    }

    @Override
    public boolean isCredentialsNonExpired() {
        return true;
    }

    @Override
    public boolean isEnabled() {
        return true;
    }
}
